gboolean skip_nontext,
gboolean skip_decomp)
{
-
gint i;
g_return_if_fail (count >= 0);
gboolean ignored = FALSE;
/* minimal workaround to avoid the infinite loop of bug #168247. */
- if (gtk_text_iter_is_end (iter))
- return;
+ if (gtk_text_iter_is_end (iter))
+ return;
if (skip_nontext &&
gtk_text_iter_get_char (iter) == GTK_TEXT_UNKNOWN_CHAR)
/* Go to end of search string */
forward_chars_with_skipping (&next, g_utf8_strlen (*lines, -1),
- visible_only, !slice, TRUE);
+ visible_only, !slice, case_insensitive);
g_free (line_text);
}
forward_chars_with_skipping (&next, offset,
- visible_only, !slice, TRUE);
+ visible_only, !slice, case_insensitive);
if (match_end)
*match_end = next;
check_found_forward ("This is some foo\nfoo text", "foo\nfoo", 0, 13, 20, "foo\nfoo");
check_found_backward ("This is some foo\nfoo text", "foo\nfoo", 0, 13, 20, "foo\nfoo");
check_not_found ("This is some foo\nfoo text", "Foo\nfoo", 0);
+
+ /* check also that different composition of utf8 characters
+ (e.g. accented letters) match */
+
+ check_found_forward ("This is some \303\200 text", "\303\200", 0, 13, 14, "\303\200");
+ check_found_forward ("This is some \303\200 text", "some \303\200", 0, 8, 14, "some \303\200");
+ check_found_forward ("This is some \303\200 text", "\303\200 text", 0, 13, 19, "\303\200 text");
+ check_found_forward ("This is some \303\200 text", "some \303\200 text", 0, 8, 19, "some \303\200 text");
+ check_found_backward ("This is some \303\240 text", "\303\240", 0, 13, 14, "\303\240");
+ check_found_backward ("This is some \303\240 text", "some \303\240", 0, 8, 14, "some \303\240");
+ check_found_backward ("This is some \303\240 text", "\303\240 text", 0, 13, 19, "\303\240 text");
+ check_found_backward ("This is some \303\240 text", "some \303\240 text", 0, 8, 19, "some \303\240 text");
}
static void